package com.bdk.middle.goods.api.client;

import com.bdk.middle.common.result.ResultDO;
import com.bdk.middle.goods.api.domain.GoodsDO;
import com.bdk.middle.goods.api.domain.GoodsDetailDO;
import com.bdk.middle.goods.api.query.GoodsQueryDO;
import org.springframework.web.bind.annotation.*;

public interface GoodsClientApi {

    /**
     * 添加商品
     * @param domain 商品DO
     * @return ResultDO
     */
    @RequestMapping(value="/goods_cliet_api/add.html", method = RequestMethod.POST)
    public @ResponseBody
    ResultDO add(@RequestBody GoodsDO domain);

    /**
     * 修改商品信息
     * @param domain 商品DO
     * @return ResultDO
     */
    @RequestMapping(value="/goods_cliet_api/edit.html", method = RequestMethod.POST)
    public @ResponseBody ResultDO edit(@RequestBody GoodsDO domain);

    /**
     * 修改商品详情
     * @param domain 商品DO
     * @return ResultDO
     */
    @RequestMapping(value="/goods_cliet_api/edit_detail.html", method = RequestMethod.POST)
    public @ResponseBody ResultDO editDetail(@RequestBody GoodsDetailDO domain);

    /**
     * 获取商品详情
     * @param id 商品ID
     * @return ResultDO
     */
    @RequestMapping(value="/goods_cliet_api/get.html", method = RequestMethod.POST)
    public @ResponseBody ResultDO get(@RequestParam("id") String id);

    /**
     * 删除商品
     * @param id 商品ID
     * @param modifier 修改人商品名
     * @return ResultDO
     */
    @RequestMapping(value="/goods_cliet_api/remove.html", method = RequestMethod.POST)
    public @ResponseBody ResultDO remove(@RequestParam("id") String id, @RequestParam("modifier") String modifier);

    /**
     * 查找商品列表分页
     * @param domain 查询DO
     * @return ResultDO
     */
    @RequestMapping(value="/goods_cliet_api/find.html", method = RequestMethod.POST)
    public @ResponseBody ResultDO find(@RequestBody GoodsQueryDO domain);
}
